Fix threaded connections