Fix dumping of textures