Fixed an issue where a setting might be updated more than once