Fixed units being lost in memory on spawnunit()