Bug fix for closing bookmarklet