What do you mean with sometimes? 50%? That would be the expected chance, wouldn't it? :scratchchin:
Anyway, you probably want to reach a certain goal, so you have to run ahead and your merc is following you. In that case, the monsters obviously notice you first and thus make their first attacks on you.
If you can teleport and your merc does the wrong thing, make a dummy teleportation, so he's back at your place and makes a new decision about what to do next.
I thought it is a common problem, so I didn't elaborate.
In some games, the monsters will walk past my mercenary like he didn't exist. A zombie would be frozen by HF and crawl towards me, as my mercenary pokes repeatly at it; A group of dark rogue would ran past my mercenary towards, even though I was just standing there; my mercenary would be surrounded by a swam of monsters and take no damage.
It happens once in a while, and get fixed maybe by returning to town.