Added scratch value to set apply_settings method.