Fixed boolean logic in Kruskal class