Bugfix: write failed due to rounding error