Fix remote env vars substitution