   (let [[docstring args] (if (string? (first args))
                            [(first args) (next args)]
                            [nil args])
-        match-pred (if (> (count args) 1)
-                     (first args) name)
-        codegen-body (last args)
+        [match-pred args] (if-not (vector? (first args))
+                            [(first args) (next args)]
+                            [name args])
+        codegen-body args
         dissoc-fn `(fn [a#] (dissoc a# ~name))]
     `(do
        (alter-meta! #'apply-trait

  attributes and sets a proper LayoutParams according to container
  type."
  #(some % [:layout-width :layout-height :layout-weight])
  (fn [wdg {:keys [layout-width layout-height layout-weight]}
      {:keys [container-type]}]
    (case (kw/keyword-by-classname container-type)
      :linear-layout
      (.setLayoutParams ^View
       wdg (linear-layout-params layout-width layout-height layout-weight))

      (.setLayoutParams ^View
       wdg (default-layout-params layout-width layout-height)))
    {:attributes-fn #(dissoc % :layout-width :layout-height
                             :layout-weight)}))

(defn- kw->unit-id [unit-kw]
  (case unit-kw

            [neko.context :as context]
            [neko.listeners.view :as view-listeners])
  (:use [neko.-utils :only [memoized]])
  (:import [android.widget LinearLayout$LayoutParams TextView]
           [android.view View ViewGroup$LayoutParams]
           android.util.TypedValue
           java.util.HashMap))
