Fixed time-related bug