Fix flag variable