fix bug of repID index out of range
rm tmp