Fixed some movement code.