crash fix when the connection could not be established