fix bug in relationships management