I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials). However, I am running in some problems. For example:

`A = Link([[[1,2,-2,-1,-3,-4,4,3]],[1,1,1,1]])`

Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial:

`A.alexander_polynomial()`

I get the following error:

```
ValueError Traceback (most recent call last) in () 1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]]) ----> 2 A.alexander_polynomial()
/home/sc_serv/sage/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var) 1780 R = LaurentPolynomialRing(ZZ, var) 1781 # The Alexander polynomial of disjoint links are defined to be 0 -> 1782 if len(self._braid_word_components()) > 1: 1783 return R.zero() 1784 t = R.gen()
/home/sc_serv/sage/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self) 1433 ([-2, 1, 1], [4, 4], [6]) 1434 """ -> 1435 ml = list(self.braid().Tietze()) 1436 if not ml: 1**437 return tuple() /home/sc_serv/sage/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self) 654 C1 = newPD[newPD.index(heads[-a])] 655 C1[C1.index(-a)] = newedge + 1 --> 656 C2 = newPD[newPD.index(tails[-b])] 657 C2[C2.index(-b)] = newedge + 2 658 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1]) ValueError: [5, 8, 6, 1] is not in list**
```

I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!