Fix sync xhr call