Fix the error message for min and max