                                                  AND source.structure->'synsem'->'sem' @> '"
                                      json-semantics "' LIMIT 1) AS source
                                   INNER JOIN (SELECT DISTINCT surface, target.structure->'synsem'->'sem' AS sem,
-                                                              root
+                                                              root,structure
                                                          FROM expression_with_root AS target
                                                         WHERE target.language=?
                                                           AND target.structure->'synsem'->'sem' = '" json-semantics "') AS target 

                           (get-in (strip-refs (deserialize
                                                (read-string (:target target-expression))))
                                              [:synsem :sem])))))
            (let [debug (log/debug (str "source-structure:"
                                        (first (map :structure results))))]
              {:source (first (map :source results))
               :source-id (first (map :source_id results))
               :target-roots (map :target_root results)
               :targets (map :target results)})))))))))

(defn get-lexeme [canonical language & [ spec ]]

            (let [results
                  (db/exec-raw [(str "SELECT source.surface AS source, source.id AS source_id,
                                             target.surface AS target,target.root AS target_root,
                                             source.structure AS structure,
                                             target.structure::text AS target_structure
                                        FROM (SELECT surface, source.structure->'synsem'->'sem' 
                                                     AS sem,
                                                     source.structure AS structure, source.id
