Tried to fix crash if settings are wrong