If the settings is disabled, we don't have to do any of the condition tests. Move this line up.