Correct the y coordinates in the borders.