Changing person['pid']['value'] to person_object->id