fixed infinite loop in getmovement