fixed time bug

time was always NA before bug fix