bugfix on environment check and gioogle analytics