More check on setting up flag