Start of using beforepagechange