fixed issues with native pointer support