fix a bug in getQAStats.env