fix isMin and isMax