corrected a bug in spi configuration