NPC flags 16 crash

Spawning NPCs, especially scanners with flags 16 will eventually cause the game to crash when the NPC notices you, any way around this?