Fix possible crash when saving game in large maps