exit detached head state