diff --git a/register.js b/register.js
index <HASH>..<HASH> 100644
--- a/register.js
+++ b/register.js
@@ -1,9 +1,9 @@
 var pug = require('./');
-var resolvedPug = require.resolve('./');
+var resolvedPug = JSON.stringify(require.resolve('./'));
 
 function compileTemplate(module, filename) {
   var template = pug.compileFileClient(filename, {inlineRuntimeFunctions: false});
-  var body = "var pug = require('" + resolvedPug + "').runtime;\n\n" +
+  var body = "var pug = require(" + resolvedPug + ").runtime;\n\n" +
              "module.exports = " + template + ";";
   module._compile(body, filename);
 }
Fixed register.js for Windows. (#<I>)