Fix bit clearing
Add minimal test case for failed bit clear
Merge pull request #2 from def-/master

Fix bit clearing