defensive switches

Signed-off-by: Steve Finkelstein <sf@stevefink.net>