Fixing a bug in set/clear flag functions
Merge pull request #5 from Theaxiom/master

I had some inconsistencies that I have resolved.