fixing id mapping