Code cleanup
Revert tx id counting to be retrocompatible with 2.1

- tx id counting should start from 1 rather than from 0