fix `min`/`max` mixup

[proof](http://i.imgur.com/Y1g20vC.png)