fixed bug with no_materials