Added fix for a failure when we try to rollback after an error and the connection is already closed