fixed bug in config_environment