[fix] Typo in env variable reference. Moved env to separate scope on request.