fixed ajax bug