backported previous implementation on field_map