trying to solve the ajax error