If it is what i think, it's not a bug... It happens to me a lot with all those moves like Triflames, Hex, Heat wave, etc. And yes, it's because the way it hits, i recommend you to cast Icicle clash when the pokemon it's close to you or when he flees, because sometimes when you cast that spell...