fix multi threaded texture loading