Hi Jiacheng,
Yes - this is actually a feature, not a bug! You can attach different materials in the material file to different "materials" in the unit cell file. Without defining the structure, the default allocation is material 1 in the material file to material 1 in the unit cell file. However, for structures you need to define which material is tagged to which material site in the unit cell. To do this, you can add the following line in the material file:
material[1]:unit-cell-category=1
material[2]:unit-cell-category=2
etc
This is actually very powerful, as you can do core shell systems, crystals with different inversion, or define different kinds of alloys, eg NdFeB and DyFeB in the same system with only a single unit cell file.
All the best,
Richard