Corrected issue with thread objects and open connections.