Fixed stats code