fix CoreData empty objects bug