add default to switch.
eliminate unreachable code.