fix stats not being saved
fix remaining tests