More fixes to textures loading