Fixed a bug where loading some textures would fail