updated more calls to dbi, fixed fold-row issues