fixed some rounding issues