Correct the flags validation