fix stats command crash