Fixing trx id bug