Fix for segmentation fault in readSettingsFile.