Fix bug in transactionId handling
Other minor stuff