Changed to charAt in getEnv