Fix category deletion

* fixes #294