Bugfix for multiple chains