Made the plugin SPI considerably more robust.