Adopted new sessions API.