Correcting minor bug

* Cost saving is now secure. Verify if the material is recognize before storing the name.