Adapted to RI changes.