As @fippo mentions, these should probably both use min or both use max.