fix chain number bug