Fix undefined tx add

Apparently the point made on #22 was not understood so.. here's the only way that loop makes sense.

Is this the intended behaviour?