It looks like it calls the second function even if foundVertices is false (or is it some other reason)