Fixes to HPN patch to resolve compile time issues