fixed an issue with the async setTimeout