Fixed more bugs related to stats tracking