Fixing multiple groups problem