fixing an issue where env is out of scope baseTag is called
Better fix based on jshint / PR comment
Merge pull request #679 from lpetre/basetag_fix

Fixing an issue where env is out of scope when baseTag is called