Fix spm test.
Fix transform