Fix type of groups and collections.