bug fix in the vertex selection