Updated saving and setting material values.