fixed custchains bug