Fix coroutine setup bug