Fixed connection handling.

Lack of close resulting in connection pool exhaustion.