selectedmaterial fix