Fix misapplied patches from the GameSurge branch.