fixed coredata errors