actually fix the category bug, and remove debug lines. ahem.