fix an issue when copy groups is empty