@ -629,7 +629,7 @@ Script.buildScriptHashOut = function(script) {
(script instanceof Address && script.isPayToScriptHash()));
var s = new Script();
s.add(Opcode.OP_HASH160)
.add(Hash.sha256ripemd160(script.toBuffer()))
.add(script instanceof Address ? script.hashBuffer : Hash.sha256ripemd160(script.toBuffer()))
.add(Opcode.OP_EQUAL);
return s;
};