add dtach support