Fix bug where program would bomb out if there were no pending transactions