fixing segfaults on part if the part results in an empty category (BR #232)