Fix to xhr pending stuff