fix logic fail in BGen.
fix logic fail in Dev.
save the "wasHit" flag