fix incorrect flag issue