    :control-bus  (mk-bitset MAX-NODES)})
 
 (defonce allocator-limits
-  {:node    MAX-NODES
-   :sdefs     MAX-SDEFS
-   :audio-bus   MAX-AUDIO-BUS
-   :control-bus MAX-CONTROL-BUS})
+  {:node         MAX-NODES
+   :audio-buffer MAX-BUFFERS
+   :audio-bus    MAX-AUDIO-BUS
+   :control-bus  MAX-CONTROL-BUS})
 
 (defn- fill-gaps
   "Fill a given vector bs with size consecutive vals from idx"

  ([k size]
     (let [bits  (get allocator-bits k)
           limit (get allocator-limits k)]
       (dosync
        (let [id (find-gap @bits size 0 0 limit)]
          (alter bits fill-gaps id size true)


(defn- find-gap
  [bs size idx gap-found limit]
  (when (> idx limit)
    (throw (Exception. (str "No more ids! Unable to allocate a sequence of ids of length" size))))
  (if (= gap-found size)
    (- idx gap-found)
