fix issue in category graph generation