bugfix creation of history table