fix for diagonal movement logic-now works fine!