Fix material data not working