fixed chain.js