Fixing inconsistency with min/max