Some cleanup.
Force connection to terminate when command finishes.