Fix SPI initialization bug