Bugfix: history recording