Fix adding to the database.