Error handling for toggles