Change clear container logic.