solved bug when selecting time interval