fixed bug in bookmarking code