Added error handling for empty switcher position