Fix uploading new materials.