Fixed sorting of prioritized callbacks