add unitest for weird chaining case