fixed some sync xhr issues