Updated the type switch.