fixed bug in stats