Added checks to sets in order verify if actual change happened.