Reorganizing transaction building a little bit

Fixing bug in --resync