Fix a page load bug with rangy