Fixed disconnect bug on client-side