fixed a number of bugs causing ImproperlyConfigured if configuration values were not in lowercase