Some more min/max improvements