Fixed some hanging database connections