                   parent-header {} session-id)
       (send-message iopub-socket "execute_result" username
                     {:execution_count @execution-count
-                     :data {:text/plain (str (:err execute-result))}
+                     :data {:text/plain (concatenate-out-on-front execute-result)}
                      :metadata {}}
                     parent-header {} session-id))
     (send-message iopub-socket "execute_result" username
                   {:execution_count @execution-count
-                   :data {:text/plain (str (:value execute-result))}
+                   :data {:text/plain (concatenate-out-on-front execute-result)}
                    :metadata {}}
                   parent-header {} session-id)))
 

     :execution_count @execution-count
     :payload [{:source "page" :data {:text/plain (str (:value execute-result))} :start 0}]
     :user_expressions {}}))

(defn send-out-message!
  [iopub-socket username parent-header session-id execute-result]

                  parent-header {} session-id)
    (send-message iopub-socket "execute_input" username (pyin-content @execution-count message)
                  parent-header {} session-id)
    (when (:out execute-result)
      (send-message shell-socket "stream" username {:name "stdout" :text (:out execute-result)}
                    parent-header {} session-id))
    (send-message shell-socket "execute_reply" username
                  (execute-reply-message execute-result)
                  parent-header
