cleanup bookmarks before saving