Fixed bugs in environment variable configuration.