Fixed variable escaping for $env_var