avoid undefined value for fields