Fix bug: alternative syntax for if switch else