Fixed typos in SPM implementation