Corrected pageinit event handlers