Fix deprecation warnings for min and max

This replaces min with minimum and max with maximum