XMLHTTPRequest bug fix

Hi
This is a bug fix branch.