fix persisent flags