Changed ds-stub to handle disconnects