set motionAttach flag correctly