Fixed problems in category.py