fixed issue when having multiple relationships with same type