Fixes rounding errors