fixing bugs with category parser