Refactored listener invocation.