Fix crash when capturing bookmarks.