Fix flag conditional