Fix evaluation of negative exponents.

Closes #38