Fix for async polling
First shot at fixing unit tests. [skipci]