Fix select time bug