adjustments for HHVM, plus other minor adjustments