crash fix if field is undefined