improving fix on settings.py