When calculating the exponents of a negative number the answer will always will be positive:
$$
-5^2 = 25
$$
This confused me but it was because I was thinking of it in terms of $-5 \cdot 5$ when in fact it is $-5 \cdot -5$ and when two negative numbers are multiplied the product is always negative.