fixed death when creating a new category