fix issue while generating the category graph