Adapted to changes in API/RI.