fix nanosecond bug