fixed error when environment is not passed to build_env.py