fix longtask sleep