Fix core data migration crash