added listener for disconnections