fix material code to uniqness