When closing the Preferences window, take focus away from the Access Token text field to force any changes to be committed.