Move transaction to the inner part.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>