fixed client so wont break if faulty server connection