Fixed crossover code