fixed coreData problem