fixed adding relationship bug