fixes problem with time selection