[core] ibdawg: bug fixed and code cleaning