Fixed bug in stats