```setFlags()``` overwrites the previous flag, we should be using ```addFlags()``` to append flags.