This is why you should never write more than 2-3 lines of code before compiling and testing. If you had written the MINIMUM amount of code needed for a switch statement, you'd have found your problem much easier.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors