Fixed Environment::add bug