Add missing variable
Wrap getBookmark in try/catch to avoid error on some elements
Fix for generic elements without embed/param