Fixing bug where an awaitable call was being run synchronously