Fixed min/max not working right :D