Optimized the DynamicListenerRegistry