fix bug for MeshCommand materialID generation