fix error message for min and max values