Fix non-existing category bug.