Pass out_ptr correctly