Ensure fields are initialized before mapping to avoid SIGFPE caused by uninitialized values