Fix issue with invalid textures after first load