fix the x1 y1 x2 y1 problem