fixed bug in existCategory: check the category id if exits