Fixing DB connection issue