added deatachment of shared segment