Fixed a significant windows-only bug when losing connection to server