Fix pagination bug with transactions, and remove unnecessary code.