Fixed some bugs in the database script and adding a new book