fixbug in movement.cpp