fixed bugs on counterpartyd