Fixing issues with config files

Proposed fixes for issues #211 and #212.  I'm not sure if it is possible to add tests for this.