Fixed braces issue with switch statement