Bugfix: done callback never invoked