removed unused command and handle disconnected peer