[#3852] Bookmark creation is broken

Here is a fix for bug #3852 and also corrected some wrong references to this in ajax.js