Fix a crash in ZMPGeneration