fixed a bug in find the target score flag
Fixed the bug of index error after the selection