Fixed min max and rounding not working as expected.