fixed a bug in time selector