Fix flag building.