fixed a bug where perfectly valid textures were randomly deleted due to double freeing of the same texture id
For instance, double freeing of a texture id occurs when the progress reaches 0 percent.