Fix the material prediction