Fix conversion to nanoseconds