Fix flag truth value issue