fixed chain re-org bug