Added support for nativeptrs