Fix typo causing error when incorrect param entered.

When entering an incorrect N value (i.e. not a power of two),
the code fails because the exception has been declared of a typo.