update to fix bug with Nan fields.  not checking for nil