Bug fixes for adding books to the database