fixed a looping error bug with the new transactions code