fixing textures loading bugs