changes to make spid work with wrappers