Revert "Materials fix."

This reverts commit a2adb4d63c089e931a2ace80fc38120c1f2e7871.
Proper fix!