fixed the disconnect bug