Fix component sorting