fixed some hhvm incompatibility issues