Added sort for active events
Added active event name detection