fixed broken EventDispatcher mechanism for sorting callbacks order
Merge pull request #5893 from mgazdzik/eventDispatcherFix

fixed broken EventDispatcher mechanism for sorting callbacks order