fix handling boolean flags
Merge pull request #16 from deric/fix-bool-flags

fix handling boolean flags for master