fix flags handling
Merge pull request #12 from whiteout-io/dev/WO-351

fix flags handling