Fixed some samples to avoid serializing pointers