Fixes to dictionary-based switch statement