Wrap callback in setTimeout

To prevent callback from being called before generator has been returned
wrap it in a callback. Fixes #2