Fixes an assignment error. Now newX and newY are the respective values.