Fixed DB connection config and connect_db()