Adapted to SPI change.