Transaction bug fixes