set PATH properly when destroying