diff --git a/lib/peg.js b/lib/peg.js
index <HASH>..<HASH> 100644
--- a/lib/peg.js
+++ b/lib/peg.js
@@ -31,8 +31,8 @@ const peg = {
 
         const plugins = "plugins" in options ? options.plugins : [];
         const config = {
-            parser: peg.parser,
-            passes: util.convertPasses( peg.compiler.passes )
+            parser: parser,
+            passes: util.convertPasses( compiler.passes )
         };
 
         plugins.forEach( p => {
@@ -41,7 +41,7 @@ const peg = {
 
         } );
 
-        return peg.compiler.compile(
+        return compiler.compile(
             config.parser.parse( grammar ),
             config.passes,
             options
Remove usless refrences to peg