C++ Mathematical Expression Library (ExprTk)  http://www.partow.net/programming/exprtk/index.html
diff --git a/exprtk.hpp b/exprtk.hpp
index 17bb65b..fffffc2 100644
--- a/exprtk.hpp
+++ b/exprtk.hpp
@@ -2892,10 +2892,12 @@
             {
                token t;
 
-               while (join(g.token_list_[i],g.token_list_[i + 1],t))
+               while (join(g[i],g[i + 1],t))
                {
                   g.token_list_[i] = t;
+
                   g.token_list_.erase(g.token_list_.begin() + (i + 1));
+
                   ++changes;
                }
             }
@@ -2914,9 +2916,10 @@
             {
                token t;
 
-               while (join(g.token_list_[i],g.token_list_[i + 1],g.token_list_[i + 2],t))
+               while (join(g[i],g[i + 1],g[i + 2],t))
                {
                   g.token_list_[i] = t;
+
                   g.token_list_.erase(g.token_list_.begin() + (i + 1),
                                       g.token_list_.begin() + (i + 3));
                   ++changes;
@@ -33721,9 +33724,9 @@
    namespace information
    {
       static const char* library = "Mathematical Expression Toolkit";
-      static const char* version = "2.71828182845904523536028747135266"
-                                   "2497757247093699959574966967627724";
-      static const char* date    = "20160113";
+      static const char* version = "2.718281828459045235360287471352662"
+                                   "49775724709369995957496696762772407";
+      static const char* date    = "20160606";
 
       static inline std::string data()
       {
diff --git a/readme.txt b/readme.txt
index 04cb5cd..badb629 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1639,11 +1639,11 @@
 symbol_table that  has been  associated with  the expression instance.
 The following demonstrates how all the pieces are put together:
 
-   typedef exprtk::symbol_table<double>    symbol_table_t;
-   typedef exprtk::expression<double>        expression_t;
-   typedef exprtk::parser<double>                parser_t;
-   typedef exprtk::function_compositor<T>    compositor_t;
-   typedef typename compositor_t::function     function_t;
+   typedef exprtk::symbol_table<double>      symbol_table_t;
+   typedef exprtk::expression<double>          expression_t;
+   typedef exprtk::parser<double>                  parser_t;
+   typedef exprtk::function_compositor<double> compositor_t;
+   typedef typename compositor_t::function       function_t;
 
    foo<double> f;
    boo<double> b;