fix time selection bug

Fix time selection bug.