flag corection