Two stitches with a knot, or three stitches even without one, are the melachah of tofer, as the Rambam writes. A safety pin, a zipper, diaper tabs, a magnet, cling wrap, and Velcro are permitted. Do not pull a loose thread to tighten a seam or a button. From the booklet of Rabbi David Shalom Naki, shlit"a.