temporary fix of bug related with closing tcp connection