Hard for me to trouble shoot here, do you have skype. PM me your skype or something.
From what it sounds like, it is not detecting the current HP of the mob properly and thinks that it's alive when it's not. This can happen for a few reasons.
1. If you are on Windows 8, it can cause some of the functions to not work properly. Try running in Win 7 compat mode or run on a Win 7 PC.
2. Look on your GUI make sure it's displaying your targets information properly when you target things. If it's not, try rebooting both the game and bot. Running everything in admin, check again.
3. Check your Max Distance box, if you don't have anything in there it could just be trying to teleport when anything is > than 0 meters away, forgot to check that.
But also are you sure its not the loot function? It will teleport to a dead corpse if it's too far away to loot but shouldn't try to attack it.