fix for an NPE caused by not checking if the correct sections exist
fix for NPE on save of IM config files