                   cols (range (.getColumnCount col-model))
                   matching (filter 
                              (fn [x] (= index (.getModelIndex (.getColumn col-model x))))
-                             cols)]
-             (first matching)))
+                             cols)
+                  found  (first matching)]
+             (if found found index)))
 
          :get-index-row
          (fn-doc "Returns the row in the view that corresponds

        (one-by-one lns (fn [r] 
                          (one-by-one (range (count (cells r)))
                            (fn [c]
                              (!! obj :set-value-at
                                (+ starty r)
                                (+ startx c)
                                ((cells r) c))))))))))

(defn-swing-threads* table-to-clipboard!

  Returns the model row-index"
           [row] row)

         :get-row-index-permutator
         (fn-doc "Returns a function that will map the current view rows to
   the according index values."
           [] identity)

         :get-column-index-permutator
         (fn-swing-doc "Returns a function that will map the current view
   columns to the according index values."
           [] 
           (let [ col-count (.getColumnCount table)
                  col-range (range col-count)
                  col-model (.getColumnModel table)
                  col-map  (zipmap col-range (map (*comp
                                                    (rho .getColumn col-model)
                                                    (rho .getModelIndex))
                                               col-range)) ]
             (fn [i] (if (>= i col-count) i (col-map i)))))

         :get-column-index
         (fn-swing-doc "Returns the tables model index of the specified
   column in the view.
