Flag correction