Issues with saving elements order in list