Fix for GM Trainer crashing server (undefined behavior on enum cast)