fixing json errors in core.xhr