fix list index issue when no targets