Bug fixes in isBipartite() and connected() methods.