fixed bug in setting xhrio request header