Fixes for CloudKit

fixes for cloudKit