Fixed IoC custom provider issues: could not differentiate from command handlers and event handlers