fix ns-page-before-load event triggering