Fixed a bug with the new texture loading