fixed transaction handling