Minor improvement of test coverage. Bugfixes listener API.