fix the bug of time sleep