fix case switch syntax errors

I wasn't able to use the gem due to some syntax issues. Would you be able to merge these changes and bump the gem version?