fixing unclosed transactions in email updates