fix bug where components may not have been torn down