Problem with switch on enumeration