chain bugfix