diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index 82b6809132a3479a1b811b4f4b1b7df8e5e4e41f..0e0e3d78dda96ac4bebbb66b34fbc1b55370dd23 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -342,8 +342,6 @@ ApplicationWindow {
     property var block
     width: root.width
     height: 240
-    x: root.x
-    y: root.y + root.height
     Component{
       id: blockDetailsDelegate
       Rectangle {
@@ -442,6 +440,7 @@ ApplicationWindow {
         text: "Contract"
         anchors.top: contractLabel.bottom
         anchors.left: parent.left
+	anchors.bottom: popup.bottom
         wrapMode: Text.Wrap
         width: parent.width - 30
         height: 80
diff --git a/ethereal/ui/ui_lib.go b/ethereal/ui/ui_lib.go
index 73ec67c869d4acaa5d21683af4e2604d6e3dac4f..9c4301ffe4530d1be2c0abb10c7a144d7ec06b72 100644
--- a/ethereal/ui/ui_lib.go
+++ b/ethereal/ui/ui_lib.go
@@ -2,7 +2,6 @@ package ethui
 
 import (
 	"bitbucket.org/kardianos/osext"
-	"encoding/hex"
 	"github.com/ethereum/eth-go"
 	"github.com/ethereum/eth-go/ethchain"
 	"github.com/ethereum/eth-go/ethutil"
@@ -94,7 +93,7 @@ func (self *UiLib) StartDbWithContractAndData(contractHash, data string) {
 	dbWindow := NewDebuggerWindow(self)
 	object := self.eth.StateManager().CurrentState().GetStateObject(ethutil.FromHex(contractHash))
 	if len(object.Script()) > 0 {
-		dbWindow.SetCode("0x" + hex.EncodeToString(object.Script()))
+		dbWindow.SetCode("0x" + ethutil.Hex(object.Script()))
 	}
 	dbWindow.SetData(data)