Fixing the invalid XY.