changed error for min