Fix onreadystatechange event handler.