Bugfix/save stats Fixed #296