bug fix

Updated to follow the spec (http://www.w3.org/TR/XMLHttpRequest/)