Fixed various rounding issues