Fixed null pointer exception when saving config. Closes #88