Fixed bug with negative numbers raised to an exponent