Fix flag collision issue