Fixed transaction problem