Fixed chaining bug