fix broken sort call