Fix undefined tx add. See #22

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