set proper flag