fixed unclosed switch statement