Fix orderdering of host resetting for ALLOWED_HOSTS