fixing timestamp rounding issues