fix bug for meterial