Save image data to CoreData.
Fix bug.