Bug fix for stats