another fix for the same sort