Fix bug with transactions/lasts/n