Fix isseus related to saving and updating of pivot tables.