Adapted to changes in S/C core.