restore autocommit on leaving transaction