Fix bug where top level promise was not handled
1.0.1