fix field references to use attributes