Bug fix: cleanup now in process detach.