Fix x_min and x_max