Prevent crash if config has been garbage collected.

Related to issue #54

This should at least prevent the app from crashing until there a better way to keep the config around is implemented.