bugfix: more careful rounding up