Fixed shutdown process in embed components