Fixed DB connection issues