fix some ajax bug