fix bad sorted fields