fix chain validation bug