Fixed some coverirty warnings. The Group/Variation switches were critical