fixed javascript HTTPrequest bug