path_manager: use stable_sort() to keep original position
Trivial changes (typo,renamed)