BigInteger fix + small reordering