fix persisent flags
Merge branch 'master' into staging