fixed bug in tempstat.py