fix some issues in chain