Small fix in the processing of the event listeners.