fix use of `done` in yielded object