Fixed the onBeforeHide method to not cause a full reload of the previous page.