Fixed secondary relationship count issue on linkage