Fixed the diagonal motion problem.