Fix assignment sorting.