Fix handling of switch case.