Do transactions in correct order.
Another minor fix.