Fixed issue with flags
Merge pull request #48 from mojoTX/bugfix_issue47

Fixed issue with flags