Fixed bug with the rendering of textures.