Fixed bug when no category exists