fix coroutine bug