added code to handle mods that don't clean up their bound textures properly