Fix bug with docking calculations where dock.y > dock.x