fix the ajax update issue