OK. I do indeed have a bug. The sequence is fixed when returning to classic mode, but in a different order than the original. I am not initialising the colour vector correctly when returning to classic mode. I will check it as soon as I can. Thank you very much for letting me know!
Best regards