correct the problem of new data not being stored when empty id field is used.