Minor correction

Infinite loop problem if failed to connect to server fixed