cleaned up the shutdown behaviour of the components