Fixes to settings.py