Fixed minor bug when checking new vertices