Fix range of x and y