fixed a leak in randomTexture