Fixed bug in movement not checking correctly