Close db connection upon method return.

Attempt to fix intermittent server error.