Incomplete chunk download caused by integer overflow which, in turn, would lead to incorret link generation. This commit is partly a workaround. A more generalized solution might be a better choice.