Fix bug with sortDescriptors