Fixing bug with motion.