Fix disconnect problem