Fix bug in stats env var