Fixing DB connection issues