Back-porting Facebook fixes