fix material code