fixed client crashing if it cant connect