fix texture binding bug that caused new textures to overwrite old ones