rounding on wrong condition