fixed env var bug