minMax functions and stability fixes