fix js ajax bug