Fixed parsing of ENV vars