fixed some small bugs related to saving tags