fix getTime (not yet debugged)