Calculate max-min properly too