Fix optional fields to be pointers