Minor enhancement for path substitution