Took two clicks because of a loop in the logic (setting to empty also invokes setting the tab). Fixes #44