fixed xhr usage