Fixed a bug in game processing where units would be undefined