fix bugs with core data