Resolved closed connection issue