Corrected error checking in printChromosome and setChromosomeActiveNodes