fixed switch parsing