Improve connection management.