fix #36: NPE - category have a parent with an invalid category id