Made flag changing make more sense