diff --git a/lib/utils/txhelper.js b/lib/utils/txhelper.js
index <HASH>..<HASH> 100644
--- a/lib/utils/txhelper.js
+++ b/lib/utils/txhelper.js
@@ -29,11 +29,12 @@ module.exports = {
       data: utils.toBuffer(json.input)
     });
 
-    // Remove all padding and make it easily comparible.
-    var to = utils.bufferToInt(utils.toBuffer(json.to));
-
-    if (json.to && to != 0) {
-      tx.to = utils.setLengthLeft(utils.toBuffer(json.to), 20);
+    if (json.to) {
+      // Remove all padding and make it easily comparible.
+      var buf = utils.toBuffer(json.to);
+      if (!buf.equals(utils.toBuffer('0x0'))) {
+        tx.to = utils.setLengthLeft(buf, 20);
+      }
     }
 
     return tx;
avoid bufferToInt in txhelper.fromJSON

can overflow if input is > <I> bits, which was causing tests to fail when
used with ethereumjs-util 5.x