fixing detach