fix coroutine nesting