Unit tests & fix bug during detach