diff --git a/lib/json-dry.js b/lib/json-dry.js
index <HASH>..<HASH> 100644
--- a/lib/json-dry.js
+++ b/lib/json-dry.js
@@ -14,7 +14,7 @@ var special_char              = '~',
  *
  * @author   Jelle De Loecker   <jelle@develry.be>
  * @since    0.1.0
- * @version  1.0.0
+ * @version  1.0.1
  *
  * @param    {Object}   root
  * @param    {Function} replacer
@@ -131,7 +131,7 @@ function createDryReplacer(root, replacer) {
 					// See if the new path is shorter
 					len = 1;
 					for (i = 0; i < path.length; i++) {
-						len += 1 + path.length;
+						len += 1 + path[i].length;
 					}
 					len += key.length;
Fix calculating length of possible replacement path