Bug fix: Set the book's id after insert