Neutral hostile units have a built-in AI that creates odd effects when issued an order. So far, people have not found an actual way to fix this, because the neutral hostile units act as if they are disobeying the king, you, the coder.
What you must do, is create a player, then spawn the units for that player. This way, the player's units will obey the coding, because they do not have that AI that nuetral hostile units have. Just another crappy feature Blizzard dumped upon us.
As far as I know, there isn't a way to stop this odd feature. The neutral hostile units are just too disobeying. But what do you expect, they are neutral hostile! ^^