Fix for issue #162
Merge pull request #166 from olliwang/pow2check

Fix for issue #162