Close connection before dropping tables