Flags management helper