Fixed movement code.