Test for transaction + fixed bug in master mode