Only loop if we have transactions