Fixed bug that prevented the update of stats