Fix for bug related to async jid polling change plus a new test