fixed bug in change handling when using transactions