fixed socket hang up problem