diff --git a/pysollib/tile/selectcardset.py b/pysollib/tile/selectcardset.py
index 1f27fd04..5755dbda 100644
--- a/pysollib/tile/selectcardset.py
+++ b/pysollib/tile/selectcardset.py
@@ -229,9 +229,9 @@ class SelectCardsetDialogWithPreview(MfxDialog):
         sw = self.top.winfo_screenwidth()
         sh = self.top.winfo_screenheight()
 
-        h = sh * .8
-        w = sw * .8
-        w1 = min(275, sw / 2.5)
+        h = int(sh * .8)
+        w = int(sw * .8)
+        w1 = int(min(275, sw / 2.5))
         geometry = ("%dx%d+%d+%d" % (w, h, (sw - w) / 2, (sh - h) / 2))
         self.top.wm_minsize(400, 200)
 
@@ -244,7 +244,7 @@ class SelectCardsetDialogWithPreview(MfxDialog):
         font = app.getFont("default")
         self.tree = self.Tree_Class(self, left_frame, key=key,
                                     default=kw.default,
-                                    font=font, width=int(w1))
+                                    font=font, width=w1)
         self.tree.frame.grid(row=0, column=0, sticky='nsew',
                              padx=padx, pady=pady)
         if USE_PIL:
diff --git a/pysollib/tile/selectgame.py b/pysollib/tile/selectgame.py
index 000f02b5..8f6f9c49 100644
--- a/pysollib/tile/selectgame.py
+++ b/pysollib/tile/selectgame.py
@@ -354,9 +354,9 @@ class SelectGameDialogWithPreview(SelectGameDialog):
         sw = self.top.winfo_screenwidth()
         sh = self.top.winfo_screenheight()
 
-        h = sh * .8
-        w = sw * .8
-        w1 = min(275, sw / 2.5)
+        h = int(sh * .8)
+        w = int(sw * .8)
+        w1 = int(min(275, sw / 2.5))
         geometry = ("%dx%d+%d+%d" % (w, h, (sw - w) / 2, (sh - h) / 2))
         self.top.wm_minsize(400, 200)
 
@@ -377,7 +377,7 @@ class SelectGameDialogWithPreview(SelectGameDialog):
         font = app.getFont("default")
         self.tree = self.Tree_Class(self, left_frame, key=gameid,
                                     default=kw.default, font=font,
-                                    width=int(w1))
+                                    width=w1)
         self.tree.frame.pack(padx=padx, pady=pady, expand=True, fill='both')
         # LabelFrame
         info_frame = ttk.LabelFrame(right_frame, text=_('About game'))
diff --git a/pysollib/tile/selecttile.py b/pysollib/tile/selecttile.py
index c29d8fb2..f8ba7981 100644
--- a/pysollib/tile/selecttile.py
+++ b/pysollib/tile/selecttile.py
@@ -130,9 +130,9 @@ class SelectTileDialogWithPreview(MfxDialog):
         sw = self.top.winfo_screenwidth()
         sh = self.top.winfo_screenheight()
 
-        h = sh * .8
-        w = sw * .8
-        w1 = min(275, sw / 2.5)
+        h = int(sh * .8)
+        w = int(sw * .8)
+        w1 = int(min(275, sw / 2.5))
         geometry = ("%dx%d+%d+%d" % (w, h, (sw - w) / 2, (sh - h) / 2))
         self.top.wm_minsize(400, 200)
 
@@ -142,7 +142,7 @@ class SelectTileDialogWithPreview(MfxDialog):
         frame.pack(fill='both', expand=True,
                    padx=kw.padx-padx, pady=kw.pady-pady)
         self.tree = self.Tree_Class(self, frame, key=key, default=kw.default,
-                                    font=font, width=int(w1))
+                                    font=font, width=w1)
         self.tree.frame.pack(side="left", fill='both', expand=False,
                              padx=padx, pady=pady)
         self.preview = MfxScrolledCanvas(frame, hbar=0, vbar=0)
diff --git a/pysollib/ui/tktile/selecttree.py b/pysollib/ui/tktile/selecttree.py
index c3e8c0b6..1b63445d 100644
--- a/pysollib/ui/tktile/selecttree.py
+++ b/pysollib/ui/tktile/selecttree.py
@@ -99,7 +99,7 @@ class BaseSelectDialogTreeCanvas:
                 height = 25 * disty
             if parent and parent.winfo_screenheight() >= 800:
                 height = 30 * disty
-            height = min(height, parent.winfo_screenheight() * .35)
+            height = int(min(height, parent.winfo_screenheight() * .35))
         self.lines = height // disty
         self._calc_MfxTreeInCanvas().__init__(
                 self, parent, self.data.rootnodes,