Reset cursor before transaction

for better undoing