Fix a bug where pageload messages were fired too many times