Fixed index exception for highlighting vertices