enchant.Queue = enchant.Class.create(enchant.EventTarget, {
    initialize: function(succ, fail) {
        enchant.EventTarget.call(this);
        this._succ = succ || null;
        this._fail = fail || null;
        this._next = null;
        this._tail = this;
    },
    next: function(func) {
        var q = new enchant.Queue(func);
        return this._add(q);
    },
    error: function(func) {
        var q = new enchant.Queue(null, func);
        return this._add(q);
    },
    _add: function(queue) {
        enchant.Queue.connect(this._tail, queue);
        this._tail = queue;
        return this;
    },
    call: function(arg) {
        var received;
        if (this._succ) {
            try {
                received = this._succ(arg);
            } catch (e) {
                return this.fail(e);
            }
        } else {
            received = arg;
        }
        if (this._next instanceof enchant.Queue) {
            if (received instanceof enchant.Queue) {
                enchant.Queue.insert(this, received);
            } else {
                this._next.call(received);
            }
        }
    },
    fail: function(arg) {
        var queue = this;
        while (queue && !queue._fail) {
            queue = queue._next;
        }
        if (queue instanceof enchant.Queue) {
            var n = queue._fail(arg);
            queue.call(n);
        } else {
            var e = new Error('queue failed');
            e.arg = arg;
            throw e;
        }
    }
});
enchant.Queue.connect = function(queue1, queue2) {
    queue1._next = queue2;
};
enchant.Queue.insert = function(queue1, ins) {
    if (queue1._next instanceof enchant.Queue) {
        ins._next = queue1._next;
    }
    enchant.Queue.connect(queue1, ins);
};
enchant.Queue.next = function(func) {
    var q = new enchant.Queue(func);
    setTimeout(function() {
        q.call();
    }, 0);
    return q;
};

@@ -668,24 +668,64 @@
         
-if (this
+var queue = this;%0A        while (queue && !queue
 ._succ) 
@@ -742,13 +742,28 @@
     
-try %7B
+queue = queue._next;
 %0A   
@@ -763,32 +763,34 @@
 xt;%0A        
+%7D%0A
         
 received = t
@@ -781,61 +781,68 @@
     
-received = this._succ(arg);%0A            %7D catch (e) %7B
+if (!(queue instanceof enchant.Queue)) %7B%0A            return;
 %0A   
@@ -842,32 +842,34 @@
 rn;%0A        
+%7D%0A
         
 return this.
@@ -860,42 +860,54 @@
     
-return this.fail(e);%0A            %7D
+try %7B%0A            received = queue._succ(arg);
 %0A   
@@ -905,36 +905,41 @@
 arg);%0A        %7D 
-else
+catch (e)
  %7B%0A            r
@@ -943,20 +943,26 @@
   re
-ceived = arg
+turn queue.fail(e)
 ;%0A  
@@ -981,20 +981,21 @@
     if (
-this
+queue
 ._next i
@@ -1111,20 +1111,21 @@
 .insert(
-this
+queue
 , receiv
@@ -1162,28 +1162,29 @@
             
-this
+queue
 ._next.call(

modify Queue#call