Fixed syntax errors for switches