bugfix: history saving broken