Fixed deletion of categories, using $tis->application