Bug fix drawing of textures