Changed MIN -> Min and MAX -> Max.