fix bug in id-extraction