Allow the call of queryInventory method at any time from any thread

If you call queryInventory outside from any of the callback methods of the extension, the app just stopped working.
This way it works in both cases (from the app callbacks and from any other place on any thread).