Options Variants In Opposite Order When Adding A Product To Order In Admin Panel

Hi, I have a strange problem - when I add a product to the order in admin panel, then on the invoice it shows options variants in opposite order. Normally it shows like: "Options: Size: XL , Color: White" and when I add a product it will have options displayed like "Options: Color: White , Size: XL" to that added product only.

It is a problem because I have a script that reads data from email invoices and it crashes then.