Why does 'switch' and case don't work?