Fixed bug with time selection