Fixed potential exploit in protected grouping