fixing ajaxerrors