fixed tcp listening bug