A couple bug fixes to material retention and materials file authoring.