Set DB connection correctly