fix sorting with components