Minor fixes to ReadSPR and WriteSPR

Nothing special.