Changed execution of material output

Execution mistake, hopefully this repairs the problem. 
(#3096)