fix duplicate path on subshell