Ensure data.ptr is always initialized