diff --git a/lib/lolapi.js b/lib/lolapi.js
index <HASH>..<HASH> 100644
--- a/lib/lolapi.js
+++ b/lib/lolapi.js
@@ -149,12 +149,13 @@
                 historyOptions += '&endIndex=' + options.endIndex;
             }
             if (options.beginTime) {
-                historyOptions += '&beginTime=' + options.beginIndex;
+                historyOptions += '&beginTime=' + options.beginTime;
             }
             if (options.endTime) {
-                historyOptions += '&endTime=' + options.endIndex;
+                historyOptions += '&endTime=' + options.endTime;
             }
             historyOptions += '&';
+            historyOptions = historyOptions.substr(1);
         }
         url = util.craftUrl(endpoint, regionAndFunc.region, matchHistoryUrl + '/' +
             summonerId + '?' + historyOptions, authKey);
fix (MatchHistory) actually use the options too

* right options set for beginTime / endTime

* cleaning url