Small fixes to Core Data support.