Test for chaining and bug fix.