Fixing error with 'switch' keyword