fixed DB connection in index.