Fixed improper rounding

Error was in dividing integers for rounding.