Fix DB connection leak