protected function sortEvents($name)
    {
        $priorities = [];
        foreach ($this->orderedHandlers[$name] as $key => $row) {
            if (is_array($row)) {
                $priorities[$key] = $row[0];
            }
        }

        Arrays::adaptOrderCol($priorities);

        foreach ($priorities as $key => $priority) {
            $this->orderedHandlers[$name][$key][0] = $priority;
        }

        Arrays::sortByCol(
            $this->orderedHandlers[$name],
            0,
            SORT_NUMERIC,
            SORT_ASC
        );
    }