fixed a integration bug in NG