fix getting the time