fix a bug that calling for getX() method of robot to get the Y coordinate