Is MaskSwitch ending up outside your parameters? What happens if you add a case else statement?