         height     (count lines)
         [v-width
          v-height] (rv/viewport-wh state)
-        popover-x  (- (/ v-width 2) (/ width 2))
-        popover-y  (- (/ v-height 2) (/ height 2))]
+        popover-x  (int (- (/ v-width 2) (/ width 2)))
+        popover-y  (int (- (/ v-height 2) (/ height 2)))]
+    (println "rendering popover at" popover-x "," popover-y)
     (render-list screen popover-x popover-y width (+ 4 height)
       (concat
         [{:s "" :fg :black :bg :white :style #{}}]

  ([^zaffre.aterminal.ATerminal screen x y string fg bg styles]
     (put-string screen (int (rmath/ceil x)) (int (rmath/ceil y)) string fg bg #{} {}))
  ([^zaffre.aterminal.ATerminal screen x y string fg bg styles mask-opts]
   {:pre [(clojure.set/superset? #{:underline :bold} styles)]}
   (let [fg   (rcolor/color->rgb fg)
         bg   (rcolor/color->rgb bg)
         {:keys [mask unmask] :or {mask #{} unmask #{}}} mask-opts

                                                                  (if (get message :text)
                                                                    (str "<color fg=\"" (name (get message :color)) "\">" (get message :text) "</color>")
                                                                    "")))]
        (println "current-time" current-time)
        (println "num-log-msgs" num-logs)
        (println "message" message)
        (put-chars screen characters)
        (render-traps state)))
    (case (current-state state)
