set proper flags