Fix invalid condition of category

Related to #28