Fixed a bug where random chromosomes would have an incorrect length