Fix "Wrapper object use after free".