added nOutputPlane == 8  check