fix sort in method setRecord