Fix group models' relation build bug