More fixes to avoid segfaults in hhvm