If one parameter gets deleted it checks if it's an active model and closes the tab