fix material slot handling