Typo in switch check variable