Improved path completion handling