edit for detached head