fix env variable index