some bugfixes (disconnect still broken)