Fixed bug with stats tracking