Fix socket conneciont issue