Fix dump_chain

Fix dump_chain for debug