fix converter resolution by making topological sort stable