Fixed the material indices