Merged in the fix for spm_get_ons from master