fixed Socket closed Exception