fixed bug when classifying books.