fix SPI errors