put back comment out flags
Merge pull request #2 from comoyo/flag_fix

put back commented out flags checks