Fix environment parser.