fix bug in coroutine functions