Improved the diagonal movement adjustment handling.