Small fix for vertex visited flag.

Small fix for vertex visited flag.