fixed motion bug