diff --git a/client/electrum4a.py b/client/electrum4a.py
index c980615ec..2ac337e60 100755
--- a/client/electrum4a.py
+++ b/client/electrum4a.py
@@ -144,16 +144,20 @@ def main_layout():
"""%(title, get_history_layout(15))
-payto_layout="""
-
-
+def make_layout(s):
+ return """
+
%s
+ %s
+ """%(title,s)
+
+payto_layout = make_layout("""
android:layout_height="wrap_content" android:text="Send">
-
-
-"""%title
-
-
+ """)
-def make_layout(s):
- return """
-
- %s
- %s
- """%(title,s)
receive_layout = make_layout("""
+
+
+
""")
settings_layout = make_layout("""
@@ -683,10 +680,11 @@ def settings_loop():
plist[host] = z
host = server_dialog(plist)
- p = plist[host]
- port = p['t']
- srv = host + ':' + port + ':t'
- droid.fullSetProperty("server","text",srv)
+ if host:
+ p = plist[host]
+ port = p['t']
+ srv = host + ':' + port + ':t'
+ droid.fullSetProperty("server","text",srv)
elif id=="buttonSave":
droid.fullQuery()