some small modifications to both Merlin and PushstateHelper.js