More fixes to nanos/millis handling