Is it a malfuntioning of the if conditional in set question?