Replaced undefined with defaults for mapswitch