fix stats script