fix the logic of the dirty check in the onbeforeunload