Make sure min < max