fix for sorting order