Fixed Database->connect

Fixed an error that was occurring with the connect method in the
database class.