correct the flags