Fix #108, reattach now works properly
Add unit test for multiple attach / restart