Zero is not a power of two. Fix #1047

Fix #1047. Also, some fixes on docstrings and a typo fixed in a previous commit.