Add check for container deletion.