fix minor bug in `update_stats()`