Fixed the ajax bug