Adding lines to deal with page_build events.