Use addFlags shortcut rather than setFlags