fixed bug with switch group increasing