bugfix in database connection