fix coredata  bug