diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -144,7 +144,7 @@ Client.prototype.connect = function() {
         debug('load bosh prebind')
         var cb = this.options.bosh.prebind
         delete this.options.bosh.prebind
-        var cmd = 'node ' + process.cwd() +
+        var cmd = 'node ' + __dirname +
             '/lib/prebind.js '
         delete this.options.bosh.prebind
         cmd += encodeURI(JSON.stringify(this.options))
Use current directory not the `cwd`