Corrected code for book category and sub-category.