Fix core data leak