Fix Range bug in SPI

This is a nasty one.