Fix: a minor bug in the new type switch support.