fixed a bug changed to max <= min