fix records sort