Fixed a bug where it was possible to get 'undefined' for an API key if the api key text box never had focus.