Fix bugs in SPM OA Pretreat

This fixes bugs found during integration testing.