fix some memory issues and crashes with iOS Prime31 Storekit wrapper