Core data relations fix