fix "invalid chain found"