Fixed Instant disconnect problem.
handled some throw exceptions.