#3844: Fix bugs in update hook
Merge pull request #4232 from openscholar/3844-update-hook_fixes

Fix bugs in os_pages update hook