fix a defects when multiple input class targeting to 1 output class