Fixed Database Connection to select a database