Fixed bounds bug with chaining.
Merge branch 'chaining'