Fixed a bug which cause crash at initial stage of attack analysis

The problem is caused by accessing invalid index of vector. Now if the
number of target is 1, the program runs without problems. But there
seems still a bug which cause issue in later stage. Need more debug.