Fixed bug for texture id reading in material.