Fixed a compile error in the upgraded code.