Fixed autoclose bug when time enabled.