fix sleep time set to 0.