commiting of transactions earliest as possible, plus one bugfix