Fix error with flag lifetime prolong