Fix errors in pet transaction handling.