Powers Fixes

Made some fixes to some problems with equations that contained multiple
operations with exponents.