Fixed some stuff for statistics