Fixing connection to DB