Changed refs min and max to Min and Max.