Fixed a bug with database and updated examples