fix cpi, spi