fix groups array