Now adds the database correctly