Fixed reference issue in coopt.getEnv()