Fixing exponentiation error with latex parser