Inserted Close() where it should be

The server was not closing the database connection. It resulted in
connection timeout, and fail when creating objects in some cases.