onbeforeunload renderer modified to handled initial value