Another fix for component sorting