Better handling of ID-setting