fixed the ajax responses