Fixed a bug when switching genomes.