fixed issue with ssh connection, raise in case of nil thread state added